<template>
  <div>
    <el-form label-width="80px" :rules="phone" :model="account">
      <el-form-item label="手机号" prop="phones">
        <el-input placeholder="请输入账号" v-model="account.name"></el-input>
      </el-form-item>
      <el-form-item label="验证码" prop="number">
        <div class="phone-code">
          <el-input
            placeholder="请输入密码"
            v-model="account.password"
          ></el-input>
          <el-button type="primary" class="btn">获取验证码</el-button>
        </div>
      </el-form-item>
    </el-form>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from 'vue'
import { ElFormItem } from 'element-plus'
import { phone } from '../config/phone.config'
export default defineComponent({
  components: {
    ElFormItem
  },
  setup() {
    const account = reactive({
      phone: '',
      number: ''
    })

    return {
      account,
      phone
    }
  }
})
</script>

<style scoped lang="less">
.phone-code {
  display: flex;
}
.btn {
  margin-left: 8px;
}
</style>
